home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / SoundAndMusic / cmix / lib / ballpole.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-25  |  408 b   |  18 lines

  1. float *
  2. ballpole(x,jcount,npoles,past,c,out,nvals)
  3. float *x,*past,*c,*out;
  4. long  *jcount,npoles,nvals;
  5. {
  6.     int i,j,nfint;
  7.     float *retval = out;
  8.     float temp;
  9.     for(i=0;i<nvals;++i){
  10.         temp = *x++;
  11.         for(j= *jcount, nfint=0;  nfint<npoles;  nfint++,j++)
  12.             temp += (*(c+nfint) * *(past+j));
  13.         *out++ =  *(past+ *jcount) = *(past+*jcount+npoles) = temp;
  14.         *jcount = (*jcount + 1) % npoles;
  15.         }
  16.     return(retval);
  17. }
  18.